<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>文件修改</title>
		<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
		<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="/static/web/css/admin.css">
	</head>
	<body>
		<form method="POST" action="tpl.php" name=form1 onSubmit="return Post();">
			<input type="hidden" name="action" value="savenewfile">
			<table class="table shadow-sm my-3">
				<tr>
					<td width="260">工作目录：</td>
					<td>
						<input name="path" value="<?php echo $path;?>" class="admin-input-lg">
						<span>（空白表示根目录，不可以用小数点..表示路径）</span>
					</td>
				</tr>
				<tr>
					<td>文件名称：</td>
					<td><input name="filename" value="newfile.htm" class="admin-textarea-xl"></td>
				</tr>
				<tr>
					<td>文件文档：</td>
					<td><textarea name="content" class="admin-textarea-xl"></textarea></td>
				</tr>
				<tr>
					<td colspan="2">
						<button type="submit" name="B1" class="btn btn-success btn-sm">保存</button>
						<button type="button" name="B4" class="btn btn-outline-success btn-sm" onclick="javascript:history.go(-1);">返回</button>
					</td>
				</tr>
			</table>
		</form>
		<script>
			function Post() {
				if (document.form1.filename.value == "") {
					alert("文件名不能为空");
					document.form1.filename.focus();
					return false;
				}
			}
		</script>
	</body>
</html>